home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
010
/
seawolf.bas
< prev
next >
Wrap
BASIC Source File
|
1988-11-09
|
7KB
|
187 lines
10 KEY OFF:CLS
20 SCREEN 0
30 WIDTH 40
40 PRINT"000000000000000000000000000000000000000"
50 PRINT"0ZDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD?0"
60 PRINT"03 30"
70 PRINT"03 2065-A.BAS 30"
80 PRINT"03 SEAWOLF 30"
90 PRINT"03 30"
100 PRINT"03 30"
110 PRINT"03 BROUGHT TO YOU BY THE MEMBERS OF 30"
120 PRINT"03 \\\\\ \\\\\ \\\\\ \\\\\ 30"
130 PRINT"03 [ [ [ [ [ [ 30"
140 PRINT"03 [ [\\\[ [ [ [ 30"
150 PRINT"03 [ [ [ [ [ 30"
160 PRINT"03 \\[\\ [ [\\\\ [\\\[ 30"
170 PRINT"03 30"
180 PRINT"03 International PC Owners 30"
190 PRINT"03 30"
200 PRINT"03P.O. Box 10426, Pittsburgh PA 1523430"
210 PRINT"03 30"
220 PRINT"0@DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDY0"
230 PRINT"000000000000000000000000000000000000000"
240 PRINT
250 PRINT " PRESS ANY KEY TO CONTINUE
260 A$=INKEY$: IF A$="" THEN 260
270 WIDTH 80
280 CLS
1000 REM ** SEAWOLF **
1010 REM IBM PC Version (1.0) 06/15/82
1020 REM Written by Pat Gibson
1030 REM Derived from original version in PDP-11/70 BASIC 03/13/77 by
1040 REM Pat Gibson (Findlay College, Findlay Ohio)
1050 REM
1060 REM If you have any suggestions or contributions please send to
1070 REM P. Gibson 700 N. Main St. Findlay, Ohio 45840
1080 REM
1090 CLS
1100 SHIP$(1,1) = "<Pt" : SHIP$(1,2) = "Pt>" : SHIP$(1,3) = " "
1110 SHIP$(2,1) = "<Sub+" : SHIP$(2,2) = "+Sub>" : SHIP$(2,3) = " "
1120 SHIP$(3,1) = "\Tanker/" : SHIP$(3,2) = "\Tanker/" : SHIP$(3,3) = " "
1130 ON KEY(10) GOSUB 2190
1140 ON KEY(11) GOSUB 2260
1150 ON KEY(12) GOSUB 2270
1160 ON KEY(13) GOSUB 2290
1170 ON KEY(1) GOSUB 2510
1180 ST$ = " "
1190 SIGHT$=CHR$(220)+CHR$(220)+CHR$(220)+CHR$(220)+CHR$(221)+CHR$(206)+CHR$(222)+CHR$(220)+CHR$(220)+CHR$(220)+CHR$(220)
1200 SIGHTX = 35 : SIGHTM = 0
1210 SEED = VAL(RIGHT$(TIME$,2)) : RANDOMIZE SEED
1220 SIGHT1$=CHR$(220)+CHR$(220)+CHR$(220)+CHR$(220)+CHR$(221)+" "+CHR$(222)+CHR$(220)+CHR$(220)+CHR$(220)+CHR$(220)
1230 SHIPX = 1 : SHIPY = 1
1240 SITE$ = SIGHT$
1250 SHIPM = 2
1260 TORPEDO$ = CHR$(186)
1270 S = 1
1280 PTIME = 60
1290 SCORE = 0
1300 COLOR 15,0
1310 GOSUB 2310
1320 COLOR 7,0
1330 LOCATE 1,1,0
1340 CLS
1350 LOCATE 1,3 : PRINT "score "; : COLOR 15,0 : PRINT "0" : COLOR 7,0
1360 LOCATE 1,20 : PRINT "Time"
1370 LOCATE 23,1
1380 FOR T = 1 TO 80 : PRINT CHR$(220); : NEXT T
1390 KEY(10) ON : KEY(11) ON : KEY(12) ON : KEY(13) ON : KEY(1) ON
1400 IF SIGHTX >=67 AND SIGHTM >=0 THEN 1430
1410 IF SIGHTX <= 3 AND SIGHTM <= 0 THEN 1430
1420 SIGHTX = SIGHTX + SIGHTM
1430 LOCATE 23,SIGHTX : PRINT SITE$
1440 IF FIRE = 0 THEN 1600
1450 IF TORPEDOY < 3 THEN GOTO 1510
1460 TORPEDOY = TORPEDOY - 2
1470 COLOR 15,0
1480 LOCATE TORPEDOY,TORPEDOX : PRINT TORPEDO$
1490 COLOR 7,0
1500 GOTO 1540
1510 PLAY "mb l64 o0;a"
1520 FIRE = 0
1530 SITE$ = SIGHT$
1540 TEMPY = TORPEDOY + 2
1550 LOCATE TEMPY,TORPEDOX : PRINT " "
1560 IF FIRE = 1 THEN 1610
1570 TORPEDOY = 22
1580 LOCATE 2,TORPEDOX : PRINT " "
1590 GOTO 1610
1600 LOCATE 1,1 : PRINT " "
1610 IF SHIPY <> 1 THEN 1690
1620 SHIPNUM = INT(RND(S) * 3) + 1 : S = S + 1
1630 DIR = INT(RND(S) * 2) + 1
1640 SHIPY = INT(RND(S) * 4) * 2
1650 SHIPY = SHIPY + 4
1660 IF DIR = 1 THEN SHIPM = -1 ELSE SHIPM = 1
1670 IF DIR = 1 THEN SHIPX = 71 ELSE SHIPX = 2
1680 SHIPM = SHIPM + ((3 - SHIPNUM) * SHIPM)
1690 LOCATE SHIPY,SHIPX : PRINT SHIP$(SHIPNUM,3)
1700 SHIPX = SHIPX + SHIPM
1710 LOCATE SHIPY,SHIPX : PRINT SHIP$(SHIPNUM,DIR)
1720 IF SHIPX < 3 OR SHIPX > 70 THEN GOTO 1750
1730 IF SHIPNUM = 1 AND SHIPX < 4 THEN GOTO 1750
1740 GOTO 1770
1750 LOCATE SHIPY,SHIPX : PRINT SHIP$(SHIPNUM,3)
1760 SHIPY = 1
1770 IF FIRE = 0 THEN 2120
1780 IF SCREEN(TORPEDOY,TORPEDOX) = ASC(TORPEDO$) OR SCREEN(TORPEDOY,TORPEDOX) = 32 THEN 2120
1790 LM = LEN(SHIP$(SHIPNUM,1))
1800 COLOR 15,0
1810 LOCATE TORPEDOY,SHIPX
1820 FOR T = 1 TO LM : PRINT CHR$(219); : NEXT T
1830 PLAY "mf o0 l64;d"
1840 LOCATE TORPEDOY,SHIPX
1850 FOR T = 1 TO LM : PRINT CHR$(178); : NEXT T
1860 PLAY "mf o0 l64;e"
1870 LOCATE TORPEDOY,SHIPX
1880 FOR T = 1 TO LM : PRINT CHR$(177); : NEXT T
1890 PLAY "mf o0 l64;f"
1900 LOCATE TORPEDOY,SHIPX
1910 FOR T = 1 TO LM : PRINT CHR$(176); : NEXT T
1920 PLAY "mf o0 l64;g"
1930 LOCATE TORPEDOY,SHIPX : PRINT " "
1940 SOUND 38,4
1950 FIRE = 0
1960 SITE$ = SIGHT$
1970 LOCATE SHIPY,SHIPX : PRINT SHIP$(SHIPNUM,3)
1980 SHIPY = 1
1990 IF SHIPNUM = 1 THEN SCORE = SCORE + 700
2000 IF SHIPNUM = 2 THEN SCORE = SCORE + 300
2010 IF SHIPNUM = 3 THEN SCORE = SCORE + 100
2020 LOCATE 1,10
2030 PRINT SCORE
2040 COLOR 7,0
2050 IF EXTEND < 3 AND SCORE >= 9000 THEN GOTO 2090
2060 IF EXTEND < 2 AND SCORE >= 6000 THEN GOTO 2090
2070 IF EXTEND < 1 AND SCORE >= 3000 THEN GOTO 2090
2080 GOTO 2120
2090 PLAY "mb o2 l8;bbb;l4;g"
2100 PTIME = PTIME + 30
2110 EXTEND = EXTEND + 1
2120 LOCATE 1,26
2130 IF PTIME < 11 THEN COLOR 27,0 ELSE COLOR 15,0
2140 PRINT INT(PTIME)
2150 COLOR 7,0
2160 IF PTIME < .8 THEN 2500
2170 PTIME = PTIME - .1
2180 GOTO 1400
2190 IF FIRE = 1 THEN RETURN
2200 TORPEDOY = 22
2210 FIRE = 1
2220 SOUND 50,8
2230 TORPEDOX = SIGHTX + 5
2240 SITE$ = SIGHT1$
2250 RETURN
2260 SIGHTM = 0:RETURN
2270 SIGHTM = -4
2280 RETURN
2290 SIGHTM = 4
2300 RETURN
2310 LOCATE 3,1
2320 PRINT " Welcome to Sea-Wolf (Version 1.0)"
2330 PRINT " "
2340 PRINT " The object of the game is to sink the enemy invasion fleet"
2350 PRINT " "
2360 PRINT " The fleet consist of the following:
2370 PRINT " "
2380 PRINT " PT boats.............";SHIP$(1,1);" 700 pts."
2390 PRINT " Submarines...........";SHIP$(2,1);" 300 pts."
2400 PRINT " Oil Tanker...........";SHIP$(3,1);" 100 pts."
2410 PRINT " "
2420 PRINT " Your torpedo sight is located at the bottom of the screen. To"
2430 PRINT "move your sight press left arrow (4) for left movement and right"
2440 PRINT "arrow (6) for right movement. Up arrow (8) will stop the sight at"
2450 PRINT "that particular position. Your fire key is Function key 10 (F10)"
2460 PRINT " "
2470 LOCATE 21,1 : PRINT " Press RETURN key to begin";
2480 INPUT XYZ$
2490 RETURN
2500 PLAY "mb o3 l8;defefefgg"
2510 CLS : PRINT "Your score was ";SCORE
2520 LOCATE 2,3 : PRINT "try again? (Y/N)";
2530 INPUT Y$
2540 IF LEFT$(Y$,1) = "y" OR LEFT$(Y$,1) = "Y" THEN GOTO 1090
2550 COLOR 7,0 : CLS
2560 SYSTEM
2570 END